Method: rich._inspect.Inspect._render.<locals>.safe_getattr
Calls: 99, Exceptions: 1, Paths: 2Back
Path 1: 98 calls (0.99)
'Thing' (5) 'as_integer_ratio' (3) 'bit_count' (3) 'bit_length' (3) 'conjugate' (3) 'denominator' (3) 'from_bytes' (3) 'imag' (3) 'numerator' (3) 'rea...
tuple (86) (None, 1) (9) (None, 0) (3)
1def safe_getattr(attr_name: str) -> Tuple[Any, Any]:
2 """Get attribute or any exception."""
3 try:
4 return (None, getattr(obj, attr_name))
5 except Exception as error:
6 return (error, None)
Path 2: 1 calls (0.01)
'broken' (1)
tuple (1)
InspectError (1)
1def safe_getattr(attr_name: str) -> Tuple[Any, Any]:
2 """Get attribute or any exception."""
3 try:
4 return (None, getattr(obj, attr_name))
5 except Exception as error:
6 return (error, None)